﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="DataVis.aspx.vb" Inherits="Week3Wscc.DataVis" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <center> 
    <h1>
    Behind the scenes... some statistics!
    </h1>
    <br />
    <strong>Users and their last activities</strong><br />

    <asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource1">
        <series>
            <asp:Series Name="Series1" XValueMember="UserName" 
                YValueMembers="LastActivityDate">
            </asp:Series>
        </series>
        <chartareas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </chartareas>
    </asp:Chart>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:FoodConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:FoodConnectionString.ProviderName %>" 
        SelectCommand="SELECT [CreateDate], [LastActivityDate], [UserName] FROM [vw_aspnet_MembershipUsers]">
    </asp:SqlDataSource>
    <br />
        <br />
    <strong>Users and their ratings</strong>    <br />

<asp:Chart ID="Chart2" runat="server" DataSourceID="SqlDataSource2">
        <Series>
            <asp:Series ChartType="Radar" Name="Series1" XValueMember="FoodUser" 
                YValueMembers="Rating">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:FoodConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:FoodConnectionString.ProviderName %>" 
        SelectCommand="SELECT [FoodUser], [Rating] FROM [UserRatings]">
    </asp:SqlDataSource>
        <br />
       <br />
       <strong>Users and the number of their comments</strong><br />
       <asp:Chart ID="Chart3" runat="server" DataSourceID="SqlDataSource3" 
           style="margin-top: 0px">
           <Series>
               <asp:Series Name="Series1" XValueMember="Author" YValueMembers="NumComments">
               </asp:Series>
           </Series>
           <ChartAreas>
               <asp:ChartArea Name="ChartArea1">
               </asp:ChartArea>
           </ChartAreas>
       </asp:Chart>
       <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
           ConnectionString="<%$ ConnectionStrings:FoodConnectionString %>" 
           ProviderName="<%$ ConnectionStrings:FoodConnectionString.ProviderName %>" 
           SelectCommand="SELECT [Author], [NumComments] FROM [NumberComments]">
       </asp:SqlDataSource>
       <br />

    </center> 
</asp:Content>
